<include file='Admin/Tpl/Public/nav.html' />
<script charset="utf-8" src="__PUBLIC__/Js/kindeditor-4.1.7/kindeditor-min.js"></script>
<script charset="utf-8" src="__PUBLIC__/Js/kindeditor-4.1.7/lang/zh_CN.js"></script>
<script type="text/javascript">
var editor;
KindEditor.ready(function(K) {
	editor = K.create('textarea[name="news_content"]', {
		resizeType : 1,
		allowPreviewEmoticons : false,
		allowImageUpload : true,
	});
});

function submitC(){
	 editor.sync();
}
</script>
<style>
.tr:nth-of-type(even){
	background:#D8F6FF;
}
</style>
<div class="page-content">
    <div class="container-fluid">
    	<br/>
        <ol class="breadcrumb default square rsaquo sm">
            <li><a href="index.html"><i class="fa fa-home"></i></a></li>
            <li><a href="#fakelink">Team In</a></li>
            <li><a href="__URL__/index">管理员管理</a></li>
            <li class="active">管理员添加</li>
        </ol>
        <div class="the-box full no-border">
            <div class="table-responsive">
                <div class="the-box">
            		<form id="ExampleBootstrapValidationForm" method="post" action="__APP__/Company/Admin/addAct" enctype="multipart/form-data">
                    	<fieldset>
                        <input type="hidden" name="news_category" value="<php>echo $_GET['category']</php>"/>
                            <!--<div class="form-group">
                                <label>管理员名称</label>
                                <input type="text" class="form-control must" type="text" name="news_title"/>
                            </div>-->
                            <div class="form-group">
                                <label>管理员用户名</label>
                                <input class="form-control must" type="text" name="admin_name" />
                            </div>
                            <div class="form-group">
                                <label>管理员密码</label>
                                <input class="form-control must" type="text" name="admin_pwd" />
                            </div>
                            
                            <div class="form-group">
                                <label>当前权限</label>
                                <select class="form-control" tabindex="2" name="admin_rights_id">
                                        <option value="1">超级管理员</option>
                                        <option value="2">一般管理员</option>
                                </select>
                            </div>
                            
                            <div class="form-group" name="check_rights" style="display:none">
                                <label>选择管理会议类型权限</label>
                                <div class="col-md-12 left">
                                <volist name='rs.meeting_category' id='val'>
                                    <label class="checkbox-inline">
                                        <input type="checkbox" name="meeting[]" value="{$val.category_id}"><span>{$val.category_name}</span>
                                    </label>
                                </volist>
                                </div>
                            </div>
                            <div class="form-group" name="check_rights" style="display:none">
                            <Br/><Br/>
                                <label>其他权限(扩充中..)</label>
                            </div>
                            <div class="form-group">
                                <input class="btn btn-primary" id="submit" type="submit" value="提交" />
                            </div>
                        </fieldset>
                	</form>
                </div>
            </div>
        </div>
<div id="main-content" style="margin:10px; padding:10px; background:none">
	<div class="content-box">
        
	</div>
	<div class="clear"></div>
</div>
</body>
</html>
<script type="text/javascript">
$("body").css("background","none");
$("#body-wrapper").css("background","none");

$('[name="admin_rights_id"]').change(function(){
	if($('[name="admin_rights_id"]').val()==2){
		$('[name="check_rights"]').each(function(index, element) {
            $(this).show();
        });
	}else{
		$('[name="check_rights"]').each(function(index, element) {
            $(this).hide();
        });
	}
});
</script>